package com.yc.cloud.api;

import com.yc.cloud.common.model.response.Outcome;
import com.yc.cloud.socket.utils.SocketClientUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 杨智杰
 * @since 2021/11/30 10:23
 */
@RestController
@Api(tags = "测试接口")
public class Demo2Api {

    @Resource
    private SocketClientUtil socketClientUtil;

    @ApiOperation("开始socket链接")
    @GetMapping("/start")
    public Outcome start(String url){
        socketClientUtil.linkSocket(url);
        return Outcome.success();
    }

}
